package cn.edu.gzist.chapter03.web;



import java.io.IOException;

import jakarta.servlet.Filter;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.annotation.WebFilter;

@WebFilter
public class FirstFilter implements Filter{

    @Override
    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain filterChain)
            throws IOException, ServletException {
        System.out.println("FirstFilter 处理请求前的处理");
        filterChain.doFilter(req,resp);
        System.out.println("FirstFilter 处理请求后的处理");
    }
    
}
